﻿<!--#include file="conn.asp"-->
<!--#include file="inc/CHAR.INC"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="images/style.css" type="text/css" rel="stylesheet">
    <meta content="MSHTML 6.00.3790.0" name="GENERATOR">
    <style type="text/css">
<!--
.STYLE2 {color: #000000}
-->
</style>
</head>
<body style="font-size: 12px; v-text-align: center" leftmargin="0" topmargin="3"
    align="center" marginheight="0" marginwidth="0">
    <script language="javascript">


        function MakeHTML(id)
        { window.open("makehtml_ad.asp?type=page&id=" + id, "", "width=150,height=20,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no"); }
        function CheckAll(form) {
            for (var i = 0; i < form.elements.length; i++) {
                var e = form.elements[i];
                //		if (e.name != 'chkall')
                e.checked = true// form.chkall.checked;
            }
        }
    </script>
    <%
     MaxPerPage=50
   if not isempty(request("page")) then 
      currentPage=cint(request("page")) 
   else 
      currentPage=1 
   end if 
set rs=server.createobject("adodb.recordset")
sql="select * from link order by id desc"
rs.open sql,conn,1,1
    %>
    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC"
        style='margin-bottom: 5px'>
        <tr class="hback">
            <td colspan="9" bgcolor="#FFFFFF">
                <div align="center">
                    <font color="#FF0000"><strong>友情连接管理 </strong></font>
                </div>
            </td>
        </tr>
        <tr>
            <td width="13%" bgcolor="e1e1e1">
                <div align="center" class="STYLE2">
                    ID</div>
            </td>
            <td width="68%" bgcolor="e1e1e1">
                <div align="center" class="STYLE2">
                    网站名称</div>
            </td>
            <td width="19%" bgcolor="e1e1e1">
                <div align="center" class="STYLE2">
                    操作</div>
            </td>
        </tr>
        <%if rs.eof then%>
        <tr>
            <td colspan="8" bgcolor="#FFFFFF">
                <div align="center">
                    没有任何内容</div>
            </td>
        </tr>
        <%
  else
allshu=rs.recordcount
rs.pagesize=MaxPerPage 
mpage=rs.pagecount     
rs.move  (currentPage-1)*MaxPerPage
i=0
id=rs("id")


do while not rs.eof
        %>
        <tr bgcolor="#FFFFFF">
            <td>
                <div align="center">
                    <%=rs("id")%>
                </div>
            </td>
            <td>
                <%=rs("sitename")%>
                (<%=rs("siteurl")%>)
            </td>
            <td>
                <div align="center">
                    <a href="link_admin.asp?id=<%=rs("id")%>&act=modify"></a><a href="javascript:MakeHTML(<%=rs("id")%>)"
                        title="生成HTML页"></a><a href="link_admin.asp?id=<%=rs("id")%>&act=modify">修改</a>&nbsp;<a
                            href="link_admin.asp?id=<%=rs("id")%>&act=del" onclick="{if(confirm('确定删除此歌曲吗，此操作不可恢复!?')){return true;}return false;}">删除</a></div>
            </td>
        </tr>
        <% i=i+1 
rs.movenext 
loop 
rs.close
end if
set rs=nothing
set conn=nothing%>
    </table>
    <table border="0" width="100%" height="26" cellspacing="0" cellpadding="0" bgcolor="#eeeeee">
        <tr>
            <td width="15%" nowrap>
                &nbsp;页次：<b><font color="ff0000">
                    <%=currentPage%>
                </font></b>/<b>
                    <%=mpage%>
                </b>&nbsp;每页&nbsp;<b><font color="ff0000">
                    <%=MaxPerPage%>
                </font></b>共 &nbsp;<b><font color="ff0000">
                    <%=allshu%>
                </font></b>
            </td>
            <td width="65%" nowrap>
                <p align="center">
                    <%pageno=currentPage  
		if cint(pageno)>1 then%>
                    <a href="link_manage.asp?page=1&type=<%=request("type")%>" title="最前页">
                        <%end if%>
                        <font face="Webdings">9</font></a>
                    <% if cint(pageno)>1 then%>
                    <a href="link_manage.asp?page=<%=currentPage-1%>&type=<%=request("type")%>" title="上一页">
                        <%end if%>
                        <font face="Webdings">7</font></a>
                    <%pp=cint(pageno)-2            
  if pp<1 then            
  pp=1            
  end if            
p=0
for pno=pp to mpage
p=p+1
if pno*1=cint(pageno)*1 then%>
                    <font color="#FF0000">[
                        <%=pno%>
                        ]</font>
                    <%else%>
                    <a href="link_manage.asp?page=<%=pno%>&type=<%=request("type")%>" title="第<%=pno%>页">
                        [
                        <%=pno%>
                        ]</a>
                    <%end if%>
                    <%if p>=5 then exit for            
next%>
                    <% if cint(pageno)< mpage then%>
                    &nbsp;<a href="link_manage.asp?page=<%=currentPage+1%>&type=<%=request("type")%>"
                        title="下一页">
                        <%end if%>
                        <font face="Webdings">8</font></a>&nbsp;
                    <% if cint(pageno)< mpage then%>
                    <a href="link_manage.asp?page=<%=mpage%>&type=<%=request("type")%>" title="最后页">
                        <%end if%>
                        <font face="Webdings">:</font></a></p>
            </td>
            <td width="18%" nowrap>
                <table cellpadding="0" cellspacing="0">
                    <form onsubmit="window.location=this.KKK2.options[this.KKK2.selectedIndex].value; return false;">
                    <tr>
                        <td nowrap>
                            到
                            <select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value">
                                <%   for i2=1 to mpage
      selected=""
      if currentpage=i2 then
          selected=" selected"
      end if%>
                                <option value="link_manage.asp?page=<%=i2%>&type=<%=request("type")%>" <%=selected%>>
                                    <%=i2%>
                                </option>
                                <%next%>
                            </select>
                            页
                        </td>
                    </form>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
<%set rs=nothing
set conn=nothing%>